﻿<%@ Page Language="C#" ValidateRequest="false" %>

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace=" System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="TarreOA.TarreOAModels" %>
<%@ Import Namespace="TarreOA.TarreOABLL" %>
<script runat="server">

    private int thl_Id;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString.Get("thl_id") != null)
            {
                thl_Id = int.Parse(Request.QueryString.Get("thl_id"));
                ViewState["thl_Id"] = thl_Id;
            }
        }
    }

    protected void Timer1_Tick(object sender, EventArgs e)
    {
        if (ViewState["thl_Id"] != null)
        {
            thl_Id = (int)ViewState["thl_Id"];
        }
        UserTalkContent utc = UserTalkContent.instance();
        StringBuilder sbu = new StringBuilder();
        if (utc.TalkContents["Talk" + thl_Id.ToString()] != null)
        {
            List<string> contentList = (List<string>)utc.TalkContents["Talk" + thl_Id.ToString()];
            foreach (string content in contentList)
            {
                sbu.AppendLine(content + "<br />");
            }
        }
        this.Label1.Text = sbu.ToString();
        ViewState["thl_Id"] = thl_Id;
        //if (utc.ContentList1 != null)
        //{
        //    foreach (string content in utc.ContentList1)
        //    {
        //        sbu.AppendLine(content + "<br />");
        //    }
        //}
        //this.Label1.Text = sbu.ToString();
    }
    
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript" src="../js/UserTalkHouse.js"></script>
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <style type="text/css"> 
        <!--
        html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
        scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
        -->
        </style>
</head>
<body>
    <form id="form1" runat="server" style="text-align:left;">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Label ID="Label1" runat="server"></asp:Label>
                <asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
                </asp:Timer>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
